-- drop all constraints
DECLARE @cmd VARCHAR(255)
DECLARE foo CURSOR
    LOCAL FORWARD_ONLY STATIC READ_ONLY
 FOR
         SELECT 'ALTER TABLE '+so1.name
          + ' DROP CONSTRAINT '+so2.name
         FROM sysobjects so1, sysobjects so2
         WHERE so1.id = so2.parent_obj
         AND so2.xtype = 'F'
OPEN foo
FETCH NEXT FROM foo INTO @cmd
WHILE @@FETCH_STATUS = 0
BEGIN
         EXEC(@cmd)
         FETCH NEXT FROM foo INTO @cmd
END
CLOSE foo
DEALLOCATE foo
 
-- drop all user tables
EXEC sp_msForEachTable 'DROP TABLE ?'
